package com.example.xd.javatest.build_test;

import com.example.xd.javatest.build_test.bean.Cpu;
import com.example.xd.javatest.build_test.bean.MainBoard;
import com.example.xd.javatest.build_test.bean.Ram;

/**
 * @auther XuDan on 2020/6/16.
 * 组件好的实类对象
 */
public class Computer {
    private Cpu mCpu;
    private MainBoard mMainBoard;
    private Ram mRam;

    public Computer() {
    }

    public Computer(Cpu cpu, MainBoard mainBoard, Ram ram) {
        mCpu = cpu;
        mMainBoard = mainBoard;
        mRam = ram;
    }

    public Cpu getCpu() {
        return mCpu;
    }

    public void setCpu(Cpu cpu) {
        mCpu = cpu;
    }

    public MainBoard getMainBoard() {
        return mMainBoard;
    }

    public void setMainBoard(MainBoard mainBoard) {
        mMainBoard = mainBoard;
    }

    public Ram getRam() {
        return mRam;
    }

    public void setRam(Ram ram) {
        mRam = ram;
    }

    public void show() {
        System.out.println(mCpu.getName() + "--" + mMainBoard.getName() + "---" + mRam.getName());
    }
}
